package com.cci.kangdao.utilTool;

import com.cci.kangdao.context.ApiApplicationContext;
import com.cci.kangdao.dao.WorkOrderNoDao;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Yaxi Zhang
 * @date 2022/2/11
 */
public class OrderGenerateUtil {

    private static WorkOrderNoDao getWorkOrderNoDao() {
        return ApiApplicationContext.getBean(WorkOrderNoDao.class);
    }

    public static String getWorkOrderNo() {
        Map<String, String> map = new HashMap<>();
        map.put("SeqCode", "WorkOrderNo");
        getWorkOrderNoDao().getOrderNo(map);
        return map.get("ReturnNum");
    }

    public static String getEscalationOrderNo() {
        Map<String, String> map = new HashMap<>();
        map.put("SeqCode", "EscalationOrderNo");
        getWorkOrderNoDao().getOrderNo(map);
        return map.get("ReturnNum");
    }
}
